package model.requirement3;

// 添加奶酪
public class CheeseTopping extends ToppingDecorator {
    public CheeseTopping(BasePizza pizza) {
        super(pizza);
    }

    @Override
    public String getDescription() {
        return pizza.getDescription() + ", 加奶酪";
    }

    @Override
    public double getCost() {
        return pizza.getCost() + 2.0; // 奶酪价格
    }
}
